maven用命令怎么更新依赖包

您所在的位置:网站首页 eclipse maven更新 maven用命令怎么更新依赖包

maven用命令怎么更新依赖包

#maven用命令怎么更新依赖包| 来源: 网络整理| 查看: 265

D:\workspace\test\trunk\src\test>mvn compile

 

常见问题汇总

1、最近在切换Maven Repository路径时,eclipse中遇到了ArtifactDescriptorException的问题,而且一下就是400多个error。

错误如下:

  View Code

看上去是有什么东西无法下载,但工程各种Clean、重新导入、Update Dependency、package、eclipse:eclipse都无效,切换到老的Repository就没问题。去新的路径下看,对应的jar包也都在,又怀疑pom中有格式错误,各种调整也没有解决。

后来使用mvn命令行进行jar下载,问题得到解决。

2、问题:

eclipse装m2eclipse的时候装完后创建项目的时候报错:

Unable to create project from archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE

解决方法:

Open Window > PreferencesOpen Maven > ArchetypesClick 'Add Remote Catalog' and add the following: Catalog File: http://repo1.maven.org/maven2/archetype-catalog.xmlDescription: maven catalog

 

3、问题:  eclipse装m2eclipse的时候装完后创建项目的时候报错:

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.

解决方法:

步骤一:  从http://maven.oschina.net/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/ 下载最新版maven-archetype-quickstart-1.1.jar

步骤二:  命令行到下载目录下执行

mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=1.1 -Dpackaging=jar -Dfile=maven-archetype-quickstart-1.1.jar

重新打开发工具创建maven项目



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3